<!--自定义文章内容的子表单--->
<div class="layui-fluid">

    <form class="layui-form">
        <input type="hidden" name="form_id" value="${params.form_id}">
        <input type="hidden" name="site_id" value="${session.site.site_id}">
        <input type="hidden" name="column_id" value="${params.column_id}">
        <input type="hidden" name="title_name" value="${params.title_name}">
        <#list  fieldDetail as data >
        <div class="layui-form-item"  >
            <label class="layui-form-label">${data.field_desc}</label>
            <div class="<#if data.field_type == 'image' || data.field_type == 'file'>layui-input-inline <#else> layui-input-block </#if>"  >
                <#if data.field_type == 'select'>
                <select  name="${data.field_name}"
                <#if data.remark=="" >  dict_type="${data.dict_type!''}" dict="${data.field_name}" addNull="1" </#if>
            required="" lay-verType="msg"
            <#if data.id?exists>  lay-filter="${data.id}"  childrenSelectId="${data.id}" </#if>
        <#if data.field_name?exists>  select_name="${data.field_name}"   </#if>

    <#if data.field_verification?? && data.field_verification!="" >  lay-verify="1${data.field_verification}"
    <#elseif data.is_required=="1">  lay-verify="required" </#if>
>
<#if data.remark!="" >
<#assign select=data.remark?eval>
<#list select.option as options>
<option value="${options.value}">${options.label}</option>
</#list>
</#if>
</select>

<#elseif data.field_type == 'image' || data.field_type == 'file'>
<div class="layui-input-inline">
    <input required="" lay-verType="msg"
    <#if data.field_verification?? && data.field_verification!="" >  lay-verify="${data.field_verification}"
    <#elseif data.is_required=="1">  lay-verify="required" </#if>

type="text" id="filePath" name="${data.field_name}" autocomplete="off" disabled="disabled" class="layui-input"/>
</div>

<#elseif data.field_type == 'edit' >
<textarea name='${data.field_name}' maxlength="8000"  required lay-verify="required" style="margin-top: 20px;border: 1px solid #cbcbcb;width: 100%;height: 130px;box-sizing: border-box;padding: 10px;"></textarea>
<#elseif data.field_type == 'datetime' >
<input type="text" name='${data.field_name}'  datetype="datetime"
       required="" lay-verType="msg"
<#if data.field_verification?? && data.field_verification!="" >  lay-verify="${data.field_verification}"
<#elseif data.is_required=="1">  lay-verify="required" </#if>
placeholder="${data.placeholder}" autocomplete="off" class="layui-input sykDate">

<#elseif data.field_type == 'radio' >
<#assign radio=data.remark?eval>
<#list radio.option as option >
<input type="radio"
<#if data.is_disabled=='1'>  disabled="disabled"  </#if>
name='${(data.field_name)!""}' value='${(option.value)!""}' title="${option.title}"
<#if option.checked?exists>checked="checked" </#if>
>
</#list>
<#elseif data.field_type == 'checkbox' >
<#assign checkbox=data.remark?eval>
<#list checkbox.option as option >
<input type="checkbox"
<#if data.is_disabled=='1'>  disabled="disabled"  </#if>
name='${(data.field_name)!""}' value='${(option.value)!""}' title="${option.title}"
<#if option.checked?exists>checked="checked" </#if>
>
</#list>
<#elseif data.field_type == 'switch' >
<#assign switch=data.remark?eval>
<input type="checkbox" <#if item.id?exists> id='${idata.field_name}' </#if>
<#if data.is_disabled=='1'>  disabled="disabled"  </#if>
name='${(data.field_name)!""}'  lay-filter='${(data.field_name)!""}' checkbox_value='${(switch.checkbox_value)!""}'  lay-skin="switch"  <#if switch.checked?exists> checked="" </#if>
<#if data.field_verification?exists>  required="" lay-verType="msg" lay-verify="${data.field_verification}"   </#if>
lay-text="${switch.checkbox_text!'正常|停止'}" value="${switch.value!'1'}" >

<#else>
<input type="${data.field_type}" name="${data.field_name}"
       required="" lay-verType="msg"
<#if data.field_verification?? && data.field_verification!="" >  lay-verify="${data.field_verification}"
<#elseif data.is_required=="1">  lay-verify="required" </#if>
value="${data.field_default_value}"  placeholder="${data.field_default_value}" autocomplete="off" class="layui-input"/>
</#if>
</div>
<#if data.field_type == 'image' || data.field_type == 'file'>
<div class="layui-input-inline">
    <button type="button"  class="layui-btn" function="upload" fileElem="#filePath" fileAccept="file" fileExts="" fileSize="${item.file_size!'1024'}" inputs="${item.inputs!'type:test'}">${time.title!'上传'}</button>
</div>
</#if>
</div>
</#list>
<hr/>
<#if fieldDetail?size gt 0>
<div class="layui-form-item" style="text-align: center;">
    <button  type="submit" class="layui-btn" lay-submit="" lay-filter="save">提交</button>
    <button type="button" class="layui-btn layui-btn-primary" function="close">关闭</button>
</div>
</#if>
</form>
</div>